import { AStarPoint } from "../../scene/map/AStarPoint";
import { GameMapUtil } from "../../scene/map/GameMapUtil";
//class PathLineDraw
    
    export  class PathLineDraw
    {
        

        public static draw(arg1: Object /* flash.display.Sprite */, arg2: Array<any>, arg3: AStarPoint, arg4: number, arg5: number): void
        {
            var loc1=0;
            var loc3=null;
            var loc2=arg2.length;
            var loc4=GameMapUtil.tilePointToLocal(arg3.x, arg3.y, arg4, arg5);
            arg1.graphics.clear();
            arg1.graphics.moveTo(loc4.x, loc4.y);
            arg1.graphics.lineStyle(1, 16711935);
            arg1.graphics.beginFill(16711680, 1);
            arg1.cacheAsBitmap = true;
            while (loc1 < loc2 - 2) 
            {
                loc3 = arg2[loc1];
                loc4 = GameMapUtil.tilePointToLocal(loc3.x, loc3.y, arg4, arg5);
                arg1.graphics.moveTo(loc4.x, loc4.y);
                arg1.graphics.drawCircle(loc4.x, loc4.y, 1);
                loc1 = loc1 + 2;
            }
            arg1.graphics.endFill();
            return;
        }
    }
